Optimal. Leaf size=123 \[ \frac {2 \sqrt {a} \sqrt {c} \text {ArcTan}\left (\frac {\sqrt {a} \sqrt {c} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)} \sqrt {c+d \sec (e+f x)}}\right )}{f}+\frac {2 \sqrt {a} \sqrt {d} \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {d} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)} \sqrt {c+d \sec (e+f x)}}\right )}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.21, antiderivative size = 123, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {4017, 4019,
209, 4065, 212} \begin {gather*} \frac {2 \sqrt {a} \sqrt {c} \text {ArcTan}\left (\frac {\sqrt {a} \sqrt {c} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a} \sqrt {c+d \sec (e+f x)}}\right )}{f}+\frac {2 \sqrt {a} \sqrt {d} \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {d} \tan (e+f x)}{\sqrt {a \sec (e+f x)+a} \sqrt {c+d \sec (e+f x)}}\right )}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 212
Rule 4017
Rule 4019
Rule 4065
Rubi steps
\begin {align*} \int \sqrt {a+a \sec (e+f x)} \sqrt {c+d \sec (e+f x)} \, dx &=c \int \frac {\sqrt {a+a \sec (e+f x)}}{\sqrt {c+d \sec (e+f x)}} \, dx+d \int \frac {\sec (e+f x) \sqrt {a+a \sec (e+f x)}}{\sqrt {c+d \sec (e+f x)}} \, dx\\ &=-\frac {(2 a c) \text {Subst}\left (\int \frac {1}{1+a c x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)} \sqrt {c+d \sec (e+f x)}}\right )}{f}-\frac {(2 a d) \text {Subst}\left (\int \frac {1}{1-a d x^2} \, dx,x,-\frac {\tan (e+f x)}{\sqrt {a+a \sec (e+f x)} \sqrt {c+d \sec (e+f x)}}\right )}{f}\\ &=\frac {2 \sqrt {a} \sqrt {c} \tan ^{-1}\left (\frac {\sqrt {a} \sqrt {c} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)} \sqrt {c+d \sec (e+f x)}}\right )}{f}+\frac {2 \sqrt {a} \sqrt {d} \tanh ^{-1}\left (\frac {\sqrt {a} \sqrt {d} \tan (e+f x)}{\sqrt {a+a \sec (e+f x)} \sqrt {c+d \sec (e+f x)}}\right )}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 20.51, size = 240, normalized size = 1.95 \begin {gather*} -\frac {2 \cot (e+f x) \sqrt {a (1+\sec (e+f x))} \sqrt {c+d \sec (e+f x)} \left (-2 \sqrt {c} \sqrt {d} \tanh ^{-1}\left (\frac {\sqrt {c} \sqrt {d+c \cos (e+f x)}}{\sqrt {d} \sqrt {c-c \cos (e+f x)}}\right ) \sqrt {c (1+\cos (e+f x))} \sin ^2\left (\frac {1}{2} (e+f x)\right )+\text {ArcTan}\left (\frac {\sqrt {c (1+\cos (e+f x))} \sqrt {d+c \cos (e+f x)}}{\sqrt {c^2 \sin ^2(e+f x)}}\right ) \sqrt {c-c \cos (e+f x)} \sqrt {c^2 \sin ^2(e+f x)}\right )}{f \sqrt {c (1+\cos (e+f x))} \sqrt {c-c \cos (e+f x)} \sqrt {d+c \cos (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1550\) vs.
\(2(99)=198\).
time = 2.07, size = 1551, normalized size = 12.61
method | result | size |
default | \(\text {Expression too large to display}\) | \(1551\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 12.18, size = 868, normalized size = 7.06 \begin {gather*} \left [\frac {\sqrt {a d} \log \left (\frac {2 \, \sqrt {a d} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) + d}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + {\left (a c - a d\right )} \cos \left (f x + e\right )^{2} + 2 \, a d + {\left (a c + a d\right )} \cos \left (f x + e\right )}{\cos \left (f x + e\right )^{2} + \cos \left (f x + e\right )}\right ) + \sqrt {-a c} \log \left (\frac {2 \, a c \cos \left (f x + e\right )^{2} - 2 \, \sqrt {-a c} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) + d}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - a c + a d + {\left (a c + a d\right )} \cos \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{f}, -\frac {2 \, \sqrt {a c} \arctan \left (\frac {\sqrt {a c} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) + d}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{a c \sin \left (f x + e\right )}\right ) - \sqrt {a d} \log \left (\frac {2 \, \sqrt {a d} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) + d}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + {\left (a c - a d\right )} \cos \left (f x + e\right )^{2} + 2 \, a d + {\left (a c + a d\right )} \cos \left (f x + e\right )}{\cos \left (f x + e\right )^{2} + \cos \left (f x + e\right )}\right )}{f}, -\frac {2 \, \sqrt {-a d} \arctan \left (\frac {\sqrt {-a d} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) + d}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{a d \sin \left (f x + e\right )}\right ) - \sqrt {-a c} \log \left (\frac {2 \, a c \cos \left (f x + e\right )^{2} - 2 \, \sqrt {-a c} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) + d}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - a c + a d + {\left (a c + a d\right )} \cos \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{f}, -\frac {2 \, {\left (\sqrt {a c} \arctan \left (\frac {\sqrt {a c} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) + d}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{a c \sin \left (f x + e\right )}\right ) + \sqrt {-a d} \arctan \left (\frac {\sqrt {-a d} \sqrt {\frac {a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt {\frac {c \cos \left (f x + e\right ) + d}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{a d \sin \left (f x + e\right )}\right )\right )}}{f}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a \left (\sec {\left (e + f x \right )} + 1\right )} \sqrt {c + d \sec {\left (e + f x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \sqrt {a+\frac {a}{\cos \left (e+f\,x\right )}}\,\sqrt {c+\frac {d}{\cos \left (e+f\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________